Requestchoice >env:mode "" "Do you want scaling ?" Yes No
t:copy c:eval t:ev
if $mode eq 1
SmartScale ask $ANIMname
if val $xout GT 352
t:ev >env:xout2 $xout/2
echo >env:xout $xout2
endif
if val $yout GT 256
t:ev >env:yout2 $yout/2
echo >env:yout $yout2
endif
t:ev >env:xout2 ($xout/16)*16
t:ev >env:yout2 ($yout/16)*16
echo >env:xout $xout2
echo >env:yout $yout2
else
SmartScale env $ANIMname
t:ev >env:xout ($xin/16)*16
t:ev >env:yout ($yin/16)*16
if val $xin not eq $xout
echo >env:mode 1
endif
if val $yin not eq $yout
echo >env:mode 1
endif
endif
echo "MP scale is $xout x $yout*N"
t:del >nil: split:#? env:V env:V2 env:#?out2
buildanim $ANIMname Split: SPLIT VERBOSE
echo "*N Animation successfully split.*N*N"
t:copy convertMPimage t:cmi
T:copy ppmtoyuvsplit t:yuv
T:copy c:move t:mv
if $mode eq 1
list >t:ConPics sort name split: lformat "t:ev >env:V2 $V+1*Necho >env:V $V2*Nt:mv >nil: %s%s t:iff*Nt:CMI noprogress format ppm x $XOUT y $YOUT t:iff to t:ppm*Nt:yuv t:PIC$V t:ppm*Nt:mv >nil: t:pic#? split:*Necho %s"
else
list >t:ConPics sort name split: lformat "t:ev >env:V2 $V+1*Necho >env:V $V2*Nt:mv >nil: %s%s t:iff*Nt:CMI noprogress format ppm t:iff to t:ppm*Nt:yuv t:PIC$V t:ppm*Nt:mv >nil: t:pic#? split:*Necho %s"